<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="注册, 用户注册, 会员注册" />
<meta name="description" content="Verydows 免费开源的电子商务系统 - 使用 Verydows 轻松创建属于您自己的网上商城。 Verydows 致力于为全球企业和个人打造免费、开源、专业、强大的电商平台系统！" />
<title>完善账号信息 - <{$common.site_name}></title>
<link rel="stylesheet" type="text/css" href="<{$common.theme}>/style/general.css" />
<link rel="stylesheet" type="text/css" href="<{$common.theme}>/style/login.css" />
<script type="text/javascript" src="<{$common.theme}>/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="<{$common.theme}>/js/general.js"></script>
<script type="text/javascript" src="<{$common.url}>/public/script/md5.js"></script>
<script type="text/javascript">
function switchAction(action){
  if(action == 'login'){
    $('#register').hide();
  }else{
    $('#login').hide();
  }
  $('#'+action).show();
}
function register(){
  var form = $('#register-form'),
      username = form.find('input[name="username"]'),
      password = form.find('input[name="password"]');
  username.vdsChecker({required:true, username:true}, {username:'用户名不符合格式要求'}, {username: /^[a-zA-Z][_a-zA-Z0-9]{4,15}$/.test(username.val())});
  password.vdsChecker({required:true, password:true});
  form.find('input[name="email"]').vdsChecker({required:true, email:true, maxlength:60});
  form.find('input[name="repassword"]').vdsChecker({equal:password.val()}, {equal:'两次密码不一致'});
  form.vdsSubmit(true);
}

function login(e){
  var form = $('#login-form');
  form.find('input[name="username"]').vdsChecker({required:true});
  form.find('input[name="password"]').vdsChecker({required:true});
  $(e).text(function(i, t){
    $(e).text('正在登陆...');
    if(form.vdsSubmit() == true){
      vdsSetCipher('login-password', '<{$salt}>');
      form.submit();
    }else{
      $(e).text(t);
    }
  });
}
</script>
</head>
<body>
<!-- 头部开始 -->
<div class="header">
  <div class="w900 mt30 cut">
    <div class="logo x-auto"><a href="<{$common.url}>"><img alt="Verydows" src="<{$common.theme}>/images/logo.gif" /></a></div>
  </div>
</div>
<!-- 头部结束 -->
<!-- 主体开始 -->
<div class="container w900 mt20">
  <div class="wbox cut">
    <div class="signup cut" id="register">
      <div class="th module cut">
        <h2 class="fl">完善账号信息</h2>
        <div class="fr">已有本站账号？<a class="pointer" onclick="switchAction('login')">点击登录</a>绑定本站账号</div>
      </div>
      <div class="mt10 pad10 c666 aln-c">
        <p>您好 <b><{$oauth_user.name}></b>，欢迎使用<b class="ml5 mr5"><{$party}>账户</b>登录<{$common.site_name}></p>
	<p class="mt20 f14">请完善您在本站的账号信息</p>
      </div>
      <form method="post" action="<{url c='user' a='register' step='submit'}>" id="register-form">
        <input type="hidden" name="oauth[name]" value="<{$oauth_user.name}>" />
	<input type="hidden" name="oauth[gender]" value="<{$oauth_user.gender}>" />
	<input type="hidden" name="oauth[avatar]" value="<{$oauth_user.avatar}>" />
        <div class="form cut">
          <dl>
            <dt><label for="username">用户名：</label></dt>
            <dd>
	      <input title="用户名" name="username" type="text" data-warnpos="fixed" />
              <font class="caaa ml10">用户名可以包含字母、数字或下划线，须以字母开头，长度为5~16个字符</font>
            </dd>
          </dl>
          <dl>
            <dt><label for="email">邮箱：</label></dt>
            <dd>
              <input title="邮箱" name="email" type="text" placeholder="@" data-warnpos="fixed" />
              <font class="caaa ml10">请填写您常用的邮箱地址，邮箱可用来重置密码，接收订促销信息，订单状态等</font>
            </dd>
          </dl>
          <dl>
            <dt><label for="password">设置密码：</label></dt>
            <dd>
              <input title="密码" name="password" type="password" data-warnpos="fixed" />
              <font class="caaa ml10">密码可包含字母、数字或特殊符号，长度为6~32个字符</font>
            </dd>
          </dl>
          <dl>
            <dt><label for="confirm_password">确认密码：</label></dt>
            <dd>
              <input title="确认密码" name="repassword" type="password" data-warnpos="fixed" />
              <font class="caaa ml10">再次输入您所设置密码</font>
            </dd>
          </dl>
          <{if !empty($captcha.register)}>
          <dl class="captcha">
            <dt>验证码：</dt>
            <dd>
              <input name="captcha" type="text" />
              <a onclick="$('#register-captcha').attr('src', '<{url c='image' a='captcha'}>&'+Math.random());">看不清换一张</a>
            </dd>
          </dl>
          <div class="captcha mt10 ml80"><img id="captcha-img" src="<{url c='image' a='captcha'}>" /></div>
          <{/if}>
          <div class="sutr mt20 ml80"><a class="form-submit aln-c radius4" onclick="register()">完成并提交</a></div>
        </div>
      </form>
    </div>
    <div class="binder hide" id="login">
      <div class="th module cut">
        <h2 class="fl">绑定本站账号</h2>
        <div class="fr">没有本站账号？<a class="pointer" onclick="switchAction('register')">返回注册</a></div>
      </div>
      <div class="login x-auto">
        <form method="post" action="<{url c='user' a='login' step='submit'}>" id="login-form">
	<input type="hidden" name="oauth" />
        <h2 class="c888">请登录您的账号</h2>
        <dl class="username mt20">
          <dt><i class="icon"></i></dt>
          <dd><input title="用户名" name="username" type="text" placeholder="请输入用户名" data-warnpos="fixed" /></dd>
        </dl>
        <dl class="pwd mt20">
          <dt><i class="icon"></i></dt>
          <dd><input title="密码" name="password" id="login-password" type="password" placeholder="请输入密码" data-warnpos="fixed" /></dd>
        </dl>
        <{if !empty($captcha.login)}>
        <div class="captcha module mt20 cut">
          <div class="module cut">
            <dl class="fl cut"><dd><input name="captcha" type="text" placeholder="验证码" /></dd></dl>
            <div class="fr"><a onclick="$('#login-captcha').attr('src', '<{url c='image' a='captcha'}>&'+Math.random());">看不清换一张</a></div>
          </div>
          <div class="mt10"><img id="login-captcha" src="<{url c='image' a='captcha'}>" /></div>
        </div>
        <{/if}>
        <a class="form-submit aln-c radius4 mt20" onclick="login(this)">登陆并绑定</a>
        </form>
      </div>
    </div>
  </div>
</div>
<!-- 主体结束 -->
<div class="cl"></div>
<!-- 页脚开始 -->
<{layout_footer}>
<!-- 页脚结束 -->
</body>
</html>